package com.xuanwu.shop.entity;

/**
 * 商品实体类
 * 
 * @author Administrator
 *
 */
public class Goods {
	private String id;
	private String name; // 商品名字
	private double price; // 商品价格
	private String description; // 商品的描述
	private int number; // 库存量
	private Category category; // 商品类型
	private GoodsStatus goodsStatus; // 商品状态
	private String pic;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public GoodsStatus getGoodsStatus() {
		return goodsStatus;
	}

	public void setGoodsStatus(GoodsStatus goodsStatus) {
		this.goodsStatus = goodsStatus;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == this) {
			return true;
		}
		if (obj instanceof Goods) {
			Goods goods = (Goods) obj;
			if (goods.getId() == this.id) {
				return true;
			}
		}
		return false;
	}

	@Override
	public String toString() {
		return "Goods [id=" + id + ", name=" + name + ", price=" + price + ", description=" + description + ", number="
				+ number + ", category=" + category + ", goodsStatus=" + goodsStatus + ", pic=" + pic + "]";
	}

}